public class DiGui {
    public static int add(int nums[],int n){
        if (n == 0){
            return nums[n];
        }
        return nums[n] + add(nums,n-1);
    }

    public static void main(String[] args) {
        int[] nums = {1,2};
        System.out.println(add(nums,nums.length-1));
    }

    public int fib(int n ){
        if(n < 2){
            return  n;
        }
        return fib(n-1) + fib(n -2);
    }
}
